
<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0">
    <title>${obj.title}</title>
    <link rel="stylesheet" href="${root}assets/third/seedsui/plugin/seedsui/seedsui.min.css">
    <style>
    	.card-title{
    		border-bottom:1px solid #ddd;padding:4px 0;margin:0 8px;
    	}
    </style>
        <script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
    <!--:if(!isEmpty(wxsign)){  -->
<script>  
wx.config({
    debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来，若要查看传入的参数，可以在pc端打开，参数信息会通过log打出，仅在pc端时才会打印。
    appId: 'wx2787c3302c182d65', // 必填，公众号的唯一标识
    timestamp: ${wxsign.timestamp}, // 必填，生成签名的时间戳
    nonceStr: '${wxsign.nonceStr}', // 必填，生成签名的随机串
    signature: '${wxsign.signature}',// 必填，签名，见附录1
    jsApiList: ["onMenuShareTimeline",
                "onMenuShareAppMessage",
                "onMenuShareQQ",
                "onMenuShareWeibo",
                "onMenuShareQZone"] // 必填，需要使用的JS接口列表，所有JS接口列表见附录2
});

wx.ready(function(){
	
	wx.onMenuShareTimeline({
	    title: '${obj.title}', // 分享标题
	    link: 'http://m.iepsy.com/combo/${obj.id}?uid=${session.user.id!}', // 分享链接
	    imgUrl: '${www}${obj.img!}', // 分享图标
	    success: function () { 
	        // 用户确认分享后执行的回调函数
	    },
	    cancel: function () { 
	        // 用户取消分享后执行的回调函数
	    }
	});
	wx.onMenuShareAppMessage({
	    title: '${obj.title}', // 分享标题
	    desc: '${session.user.nickname!}邀请你购买该套餐\nUID:${session.user.id!0}', // 分享描述
	    link: 'http://m.iepsy.com/combo/${obj.id}?uid=${session.user.id!}', // 分享链接
	    imgUrl: '${www}${obj.img!}', // 分享图标
	    type: 'link', // 分享类型,music、video或link，不填默认为link
	    dataUrl: '${wxsign.url!}', // 如果type是music或video，则要提供数据链接，默认为空
	    success: function () { 
	        // 用户确认分享后执行的回调函数
	        //alert("确认分享")
	    },
	    cancel: function () { 
	        // 用户取消分享后执行的回调函数
	         //alert("确取消分享")
	    }
	});
})

</script>  
<!--:}  -->
</head>

<body ontouchstart="">
    	<article style="top:0px;bottom:56px;">
    			<div id="player1" style="height: 180px;" controls="">
    			
			       
					<img src="${www}${obj.img}" height="180px;" width="100%;" />
					
					<a href="javascript:back()" style="color: white;top: 30px;position: absolute;z-index: 99999;"><i class="icon icon-arrowleft"></i></a>
			    </div>
			    
			    <div class="card-info" style="margin:0 8px;">
			    	<label>
			    		<i class="icon icon-user"></i>
			    		<small class="tip">${obj.num!0}</small>
			    		<small>人购买</small>
			    	</label>
			    	
			    	<a class="right">
			    		<i class="icon icon-fav"></i>
			    		<label>收藏</label>
			    	</a>
			    </div>
			    
			    
                <div class="sliver" style="background-color: white;">
                <div class="card-title" style="border-bottom:0px;">
			    	<strong class="title nowrap">${obj.title}</strong>
			    	<small>机构:${obj.agency_name!}&nbsp;&nbsp;&nbsp;&nbsp;
			    	更新时间:${obj.add_time,"yyyy年MM月"}
			    	</small>
			    </div></div>
			    
            <ul class="tabbar animate-slide width-full" data-col="2" id="tabbar">
               	<li class="tab active">
                    <label class="tab-label">课程</label>
                </li>
                <li class="tab ">
                    <label class="tab-label">简介</label>
                </li>
                
            </ul>
            <div class="slider-container" id="carouselPage" style="height: 100%;">
                <div class="slider-wrapper">
                	<div class="slider-slide">
                    	<ul id="grid" class="grid album" data-col="2" style="background-color:white;" >
                <!--:for(course in obj.courses){  -->
                <li onclick="location.href='${root}course/${course.id}'">
                    <a style="background-image: url(${www}${course.img});">
                    <div class="sticker top right">
                    <!--:if(course.price>0){  -->
                    <span>HOT</span>
                    <!--:}else{  -->
                    <span>NEW</span>
                    <!--:}  -->
                    </div>
                        <label class="bottom" style="background-color: black;width: 100%;position: absolute;bottom: 0px;left: 0px;">
                        <small class="nowrap" style="width: 100%;display: inline-block;">${course.title}</small></label>
                    </a>
                    <div style="text-align: left;">
                    <small><i class="icon icon-time" style="font-size: 12px;width: 12px;height: 12px;"></i>${course.section}集</small>
                     <!--:if(course.price>0){  -->
                    <small style="float: right;color: red;">￥${course.price,"#"}</small>
                     <!--:}else{  -->
                    <small style="float: right;color: red;">免费</small>
                     <!--:}  -->
                    </div>
                </li>
                <!--:}  -->
            </ul>
                    </div>
                    <div class="slider-slide">
                     &nbsp;&nbsp;&nbsp;&nbsp;${obj.text}<br/>
                    </div>
                    
                </div>
            </div>    
            
              
            
        </article>
        <footer>
        <!--:if(isEmpty(obj.combo_user)){  -->
        <ul class="menubar" style="background-color: black;">
            <li class="tab " style="color: white;">
                ￥${obj.price,"#"}
            </li>
            
            <li class="tab "  onclick="location.href='${root}pay/combo/${obj.id}${decode(isEmpty(p.uid),true,'','?uid='+p.uid)}'">
                <a class="button block margin8 bg-4" >立即购买</a>
            </li>
        </ul>
        <!--:}else{  -->
		<ul class="menubar">
            <li class="tab " onclick="location.href='${root}'">
                <i class="icon icon-home-fill"></i>
                <label class="tab-label">首页</label>
            </li>
            <li class="tab "  onclick="location.href='${root}combo/'">
                <i class="icon icon-typevideo"></i>
                <label class="tab-label">套餐</label>
            </li>
        </ul>
        <!--:} -->
	</footer>
    <script src="${root}js/jquery-2.1.3.js"></script>
    <script src="${root}assets/third/seedsui/plugin/seedsui/seedsui.min.js"></script>
    <script type="text/javascript">
		//定义exmobi返回
		        window.onload=function(){

            var s2=new Slider("#carousel2",{
                "pagination":".slider-pagination",
                "slidesPerView":"3",
                "loop":true
            });
        }
		
		        var carouselPage;
		        function initSlider(){
		            carouselPage=new Slider("#carouselPage",{
		                "onSlideChangeEnd":function(e){
		                    tabActive(e.index);
		                }
		            });
		           
		        }
		        /*==========
		        页签
		        ===========*/
		        var tabbar=document.getElementById("tabbar");
		        var tab=tabbar.querySelectorAll(".tab");
		        //选中tab
		        function tabActive(index){
		            for(var i=0,t;t=tab[i++];){
		                t.classList.remove("active");
		            }
		            tab[index].classList.add("active");
		        }
		        //初始化tabbar
		        function initTabbar(){
		            for(var i=0,t;t=tab[i++];){
		                (function(i){
		                    t.addEventListener("click",function(){
		                        carouselPage.slideTo(i-1);
		                        tabActive(i-1);
		                    },false);
		                })(i);
		            }
		        }
		        window.addEventListener("load",function(){
		            initSlider();
		            initTabbar();
		            
		        },false);
		function back(){history.go(-1);}
    </script>
</body>
</html>